<#include "../macro/seller.html" />
<@layout>
<link rel="stylesheet" href="../css/productDetail.css" type="text/css">
<script type="text/javascript" src="../js/productDetail.js"></script>
<!-- content start -->
<div class="admin-content">
    <input type="hidden" value="${numid!}" id="numid"/>
    <div class="am-cf am-padding">
        <div class="am-fl am-cf">
            <strong class="am-text-primary am-text-lg">商品详情</strong>
        </div>
    </div>
    <div style="padding-left: 10px; width: 90%;">
        <fieldset>
            <div class="am-form-group"
            style="width: 500px; display: inline-block; vertical-align: middle;">
                <label for="doc-ipt-email-1">品牌名称</label>
                <input type="text"
                id="name" class="am-form-field" id="doc-ipt-email-1"
                style="width: 500px;" value="${title!}" placeholder="品牌名称">
            </div>

            <div class="am-form-group">
                <label for="doc-ipt-email-1">适应人群 </label></br> <#if isman??> <#if
                isman==0> <label class="am-checkbox-inline">
                    <input
                    type="checkbox" id="isboy" onchange="manChange(this,'1')"
                    value="1">
                    男 </label><label class="am-checkbox-inline">
                    <input type="checkbox"
                    id="isgirl" onchange="manChange(this,'0')" value="0"
                    checked="checked">
                    女<font color="#ffaa00">&nbsp;&nbsp;【请务必选择性别 】</font> </label> <#elseif isman==1> <label class="am-checkbox-inline">
                    <input
                    type="checkbox" id="isboy" onchange="manChange(this,'1')"
                    checked="checked" value="1">
                    男 </label><label class="am-checkbox-inline">
                    <input type="checkbox"
                    id="isgirl" onchange="manChange(this,'0')" value="0">
                    女<font color="#ffaa00">&nbsp;&nbsp;【请务必选择性别 】</font> </label> <#else> <label class="am-checkbox-inline">
                    <input
                    type="checkbox" id="isboy" onchange="manChange(this,'1')"
                    checked="checked" value="1">
                    男 </label><label class="am-checkbox-inline">
                    <input type="checkbox"
                    id="isgirl" onchange="manChange(this,'0')" value="0"
                    checked="checked">
                    女<font color="#ffaa00">&nbsp;&nbsp;【请务必选择性别 】</font> </label> </#if> <#else> <label class="am-checkbox-inline">
                    <input
                    type="checkbox" id="isboy" onchange="manChange(this,'1')"
                    checked="checked" value="1">
                    男 </label><label class="am-checkbox-inline">
                    <input type="checkbox"
                    id="isgirl" onchange="manChange(this,'0')" value="0">
                    女<font color="#ffaa00">&nbsp;&nbsp;【请务必选择性别 】</font> </label> </#if>

            </div>

            <div class="am-form-group">
                <#if type??> <#if type=='0'> <label class="am-radio-inline">
                    <input type="radio" value="皮鞋" name="docInlineRadio"
                    checked="checked">
                    皮鞋/休闲鞋 </label><label class="am-radio-inline">
                    <input type="radio"
                    value="运动" name="docInlineRadio">
                    运动鞋<font color="#ffaa00">&nbsp;&nbsp;【运动休闲鞋也归为此类 】</font> </label> <#else> <label
                class="am-radio-inline">
                    <input type="radio" value="皮鞋"
                    name="docInlineRadio">
                    皮鞋/休闲鞋 </label><label class="am-radio-inline">
                    <input type="radio"
                    value="运动" name="docInlineRadio" checked="checked">
                    运动鞋 <font color="#ffaa00">&nbsp;&nbsp;【运动休闲鞋也归为此类 】</font></label>
                </#if> <#else> <label class="am-radio-inline">
                    <input
                    type="radio" value="皮鞋" name="docInlineRadio">
                    皮鞋/休闲鞋 </label><label class="am-radio-inline">
                    <input type="radio"
                    value="运动" name="docInlineRadio">
                    运动鞋<font color="#ffaa00">&nbsp;&nbsp;【运动休闲鞋也归为此类 】</font></label> </#if>

            </div>

            <div class="am-form-group" style="width: 600px;padding: 10px 0px;display: inline-block;">
                <label for="doc-select-1">请选择模板</label>
                <select id="doc-select-1"
                style="width: 500px;" onchange="getTempletSize(this)">
                    <#if titList??> <#list titList as tit>
                    <option value="${tit}">${tit}</option> </#list> </#if>
                </select>
                <span class="am-form-caret"></span>
            </div>
            <div style="display: inline-block;">
                <button type="button" class="am-btn am-btn-secondary" style="font-size:12px;background-color: gray;border: none;height:30px;line-height: 20px;vertical-align: middle;" onclick="toTemplet()">
                    设置模板
                </button>
            </div>

            <div>
                <button type="button"
                style="width: 80px; background-color: #ffffff;"
                onclick="addSize()" class="am-btn am-btn-secondary">
                    <font color="#0e90d2" size="1">增加鞋码</font>
                </button>
            </div>
            <div style="margin-left: -15px;">
                <#if sizeList??>
                <table border="0" id="sizeTable">
                    <#list sizeList as li>
                    <tr>
                        <td style="width: 150px;">
                        <input type="text" name="size"
                        style="width: 80px;" value="${li.french_size}" />
                        码</td>
                        <td
                        style="width: 180px; display: <#if isman==1|| isman==2>black<#else>none</#if>"
                        class="boyclass">男
                        <input type="text" name="boymm"
                        style="width: 80px;"
                        value="<#if isman==1 || isman==2>${li.size}</#if>" />
                        MM </td>
                        <td
                        style="width: 180px; display: <#if isman==0|| isman==2>black<#else>none</#if>"
                        class="girlclass">女
                        <input type="text" name="girlmm"
                        style="width: 80px;"
                        value="<#if isman==0 || isman==2	>${li.size}</#if>" />
                        MM </td>
                        <td>
                        <button type="button"
                        style="width: 50px; background-color: #ffffff;"
                        onclick="removeSize(this)" class="am-btn am-btn-secondary">
                            <font color="#0e90d2">-</font>
                        </button></td>
                    </tr>
                    </#list>
                </table>
                <#else>
                <table border="0" id="sizeTable">
                    <tr>
                        <td style="width: 150px;">
                        <input type="text" name="size"
                        style="width: 80px;" />
                        码</td>
                        <td style="width: 180px;" class="boyclass">男
                        <input
                        type="text" name="boymm" style="width: 80px;" />
                        MM </td>
                        <td style="width: 180px; display: none" class="girlclass">女
                        <input
                        type="text" name="girlmm" style="width: 80px;" />
                        MM </td>
                        <td>
                        <button type="button"
                        style="width: 50px; background-color: #ffffff;"
                        onclick="removeSize(this)" class="am-btn am-btn-secondary">
                            <font color="#0e90d2">-</font>
                        </button></td>
                    </tr>
                </table>
                </#if>
            </div>
            <br>

            <div class="foot-type">
                <P>
                    <font style="font-size: 1.6rem" color="#0e90d2">尺码特点</font><font color="#ffaa00">&nbsp;&nbsp;【运动休闲鞋也归为此类 】</font>
                </P>
                <div>
                    <table border=0>
                        <tr>
                            <td width="50px;">
                            <button type="button"
                            style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                            class="am-btn am-btn-secondary">
                                <font color="#0e90d2">偏宽脚型 建议：</font>
                            </button></td>
                            <td width="50px;">
                            <select data-am-selected id="stout">
                                <#if pro??>
                                <#if pro.foot_stout==2>
                                <option value="2" selected="selected">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0">正常码</option>
                                <#elseif pro.foot_stout==1>
                                <option value="2">大两码</option>
                                <option value="1" selected="selected" >大一码</option>
                                <option value="0">正常码</option>
                                <#elseif pro.foot_stout==0>
                                <option value="2">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0" selected="selected">正常码</option>
                                </#if>
                                <#else>
                                <option value="2">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0" selected="selected">正常码</option>
                                </#if>
                            </select></td>
                        </tr>
                        <tr>
                            <td width="50px;">
                            <button type="button"
                            style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                            class="am-btn am-btn-secondary">
                                <font color="#0e90d2">正常脚型 建议：</font>
                            </button></td>
                            <td width="50px;">
                            <select data-am-selected id="normal">

                                <#if pro??>
                                <#if pro.foot_normal==2>
                                <option value="2" selected="selected">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                <#elseif pro.foot_normal==1>
                                <option value="2">大两码</option>
                                <option value="1" selected="selected" >大一码</option>
                                <option value="0">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                <#elseif pro.foot_normal==0>
                                <option value="2">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0" selected="selected">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                <#elseif pro.foot_normal==-1>
                                <option value="2">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0">正常码</option>
                                <option value="-1" selected="selected">小一码</option>
                                <option value="-2">小两码</option>
                                <#else>
                                <option value="2" >大两码</option>
                                <option value="1">大一码</option>
                                <option value="0">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2" selected="selected">小两码</option>
                                </#if>
                                <#else>
                                <option value="2">大两码</option>
                                <option value="1">大一码</option>
                                <option value="0" selected="selected">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                </#if>
                            </select></td>
                        </tr>
                        <tr>
                            <td width="50px;">
                            <button type="button"
                            style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                            class="am-btn am-btn-secondary">
                                <font color="#0e90d2">偏瘦脚型 建议：</font>
                            </button></td>
                            <td width="50px;">
                            <select data-am-selected id="lean">
                                <#if pro??>
                                <#if pro.foot_lean==0>
                                <option value="0" selected="selected">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                <#elseif pro.foot_lean==-1>
                                <option value="0">正常码</option>
                                <option value="-1" selected="selected">小一码</option>
                                <option value="-2">小两码</option>
                                <#else>
                                <option value="0">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2" selected="selected">小两码</option>
                                </#if>
                                <#else>
                                <option value="0" selected="selected">正常码</option>
                                <option value="-1">小一码</option>
                                <option value="-2">小两码</option>
                                </#if>
                            </select></td>
                        </tr>
                    </table>
                </div>
            </div>
    </div>

    <P style="margin-left: 20px;">
        <font style="font-size: 1.6rem" color="#0e90d2">在标签下添加买家好评</font><button type="button" onclick="opencomment();" style="background-color: #ffffff; border-color: #e3e3e3;" class="am-btn am-btn-secondary">
                                <font color="#0e90d2">+添加</font></button>
    </P>
                    
    <div class="addcomment" id="addcomment" style="display:none;">
        <div class="addcomment-table">
            <table >
                <tr>
                    <td>
                    <button type="button"
                    style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                    class="am-btn am-btn-secondary">
                        <font color="#0e90d2">鞋子软硬</font>
                    </button></td>
                    <td>
                    <button class="am-btn am-btn-secondary" type="button"
                    style="width: 150px;" onclick="opendialog(1)">
                       		添加评论
                    </button></td>
                </tr>
                <tr>
                    <td>
                    <button type="button"
                    style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                    class="am-btn am-btn-secondary">
                        <font color="#0e90d2">裤子搭配</font>
                    </button></td>
                    <td>
                    <button class="am-btn am-btn-secondary" type="button"
                    style="width: 150px;" onclick="opendialog(2)">
                       		添加评论
                    </button></td>
                </tr>
                <tr>
                    <td>
                    <button type="button"
                    style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                    class="am-btn am-btn-secondary">
                        <font color="#0e90d2">实物颜色</font>
                    </button></td>
                    <td>
                    <button class="am-btn am-btn-secondary" type="button"
                    style="width: 150px;" onclick="opendialog(3)">
                        	添加评论
                    </button></td>
                </tr>
                <tr>
                    <td>
                    <button type="button"
                    style="width: 150px; background-color: #ffffff; border-color: #e3e3e3;"
                    class="am-btn am-btn-secondary">
                        <font color="#0e90d2">透气性能</font>
                    </button></td>
                    <td>
                    <button class="am-btn am-btn-secondary" type="button"
                    style="width: 150px;" onclick="opendialog(4)">
                      	  添加评论
                    </button></td>
                </tr>
            </table>
        </div>
        <div id="qipao">
            <span>请选择描述更丰富的评论,
                <br>
                如 “鞋子穿了几天，皮质很软，里面是加绒的，走路不觉得累脚。快递不错，隔天就到了。”</span>
        </div>
    </div>

    <br>
    <p style="clear: both;width: 90%;">
        <button type="button" class="am-btn am-btn-secondary" style="margin-left: 50%;"
        onclick="submit()">
            保存
        </button>
        <button type="button" class="am-btn am-btn-secondary" style="font-size:12px;background-color: gray;border: none;margin-left: 300px;height:30px;line-height: 20px;vertical-align: middle;"
        onclick="toSetBanner()">
            设置显示图片
        </button>
    </p>
    </fieldset>
</div>

<!-- 弹出的评论列表 -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="your-modal">
    <div class="am-modal-dialog"
    style="border: solid; width: 700px; height: 550px;">
        <div class="am-modal-bd">
            <!-- 内容 -->
            <div class="am-u-sm-12 am-u-md-3">
                <div class="am-input-group am-input-group-sm">
                    <input id="searchkey" type="text" class="am-form-field"
                    style="width: 180px;">
                    <span class="am-input-group-btn">
                        <button class="am-btn am-btn-secondary" type="button"
                        onclick="search()">
                            搜索
                        </button> </span>
                </div>
            </div>
            <span><font color="#0e90d2" style="font-size: 14px;">(请不要超过三条好评)</font></span>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="am-btn am-btn-secondary"
            onclick="openSelected()" style="font-size: 14px;">
                	已添加评论
            </button>
            </br> </br>
            <div style="padding-left: 13px; overflow-x: hidden; height: 400px; text-align: left"
            id="commentList">
                <#if evaList??> <#list evaList as list>
                <p>
                    <input type="checkbox" name="commentname"
                    onchange="commentChange(this,'${list.content!}','${list.nick!}','${list.created!}')">
                    &nbsp;<span id>${list.content!}</span></br><span>${list.nick!}</span>--<span>${list.created!}</span>
                </p>
                </#list> </#if>
            </div>
            </br>
            <div>
                <button type="button" class="am-btn am-btn-secondary"
                onclick="closedialog()">
                    保存
                </button>
            </div>

            <div class="comment1">
                <#if comment1??>
                <input type="hidden" class="first" value="<#if comment1?size gt 0><#assign comm = comment1[0] />${comm!' '}</#if>" />
                <input type="hidden" class="second" value="<#if comment1?size gt 1><#assign comm = comment1[1] />${comm!' '}</#if>" />
                <input type="hidden" class="third" value="<#if comment1?size gt 2><#assign comm = comment1[2] />${comm!' '}</#if>" />
                <#else>
                <input type="hidden" class="first" value="" />
                <input type="hidden" class="second" value="" />
                <input type="hidden" class="third" value="" />
                </#if>
            </div>
            <div class="comment2">
                <#if comment2??>
                <input type="hidden" class="first" value="<#if comment2?size gt 0><#assign comm = comment2[0] />${comm!' '}</#if>" />
                <input type="hidden" class="second" value="<#if comment2?size gt 1><#assign comm = comment2[1] />${comm!' '}</#if>" />
                <input type="hidden" class="third" value="<#if comment2?size gt 2><#assign comm = comment2[2] />${comm!' '}</#if>" />
                <#else>
                <input type="hidden" class="first" value="" />
                <input type="hidden" class="second" value="" />
                <input type="hidden" class="third" value="" />
                </#if>
            </div>
            <div class="comment3">
                <#if comment3??>
                <input type="hidden" class="first" value="<#if comment3?size gt 0><#assign comm = comment3[0] />${comm!' '}</#if>" />
                <input type="hidden" class="second" value="<#if comment3?size gt 1><#assign comm = comment3[1] />${comm!' '}</#if>" />
                <input type="hidden" class="third" value="<#if comment3?size gt 2><#assign comm = comment3[2] />${comm!' '}</#if>" />
                <#else>
                <input type="hidden" class="first" value="" />
                <input type="hidden" class="second" value="" />
                <input type="hidden" class="third" value="" />
                </#if>
            </div>
            <div class="comment4">
                <#if comment4??>
                <input type="hidden" class="first" value="<#if comment4?size gt 0><#assign comm = comment3[0] />${comm!''}</#if>" />
                <input type="hidden" class="second" value="<#if comment4?size gt 1><#assign comm = comment3[1] />${comm!''}</#if>" />
                <input type="hidden" class="third" value="<#if comment4?size gt 2><#assign comm = comment3[2] />${comm!''}</#if>" />
                <#else>
                <input type="hidden" class="first" value="" />
                <input type="hidden" class="second" value="" />
                <input type="hidden" class="third" value="" />
                </#if>
            </div>
            <!-- 内容 -->
        </div>

    </div>
</div>

<div class="am-modal am-modal-no-btn" tabindex="100" id="your-modal2"
style="margin-left: 1px; margin-bottom: 20px; width: 394px; height: 315px; background-image: url('../image/selected_comment.png');">
    <div class="am-modal-dialog"
    style="width: 394px; height: 315px; background-image: url('../image/selected_comment.png');">
        <div class="am-modal-hd">
            <font color="#0e90d2">已选择评论</font><a href="javascript: void(0)"
            class="am-close am-close-spin" data-am-modal-close>&times;</a>
        </div>
        <div id="selectComment" class="am-modal-bd" style="overflow: auto; padding: 5px; margin-left: 20px; margin-top: 10px; width: 350px; height: 240px" ></div>
    </div>
</div>
</div>
<!-- content end -->
<script type="text/javascript">
    function toSetBanner(){
        var numids=$("#numid").val();
        window.location.href="../selleradmin/toSetBanner?numids="+numids;
    }
    function search(){
    	
    }
</script>

</@layout>